1. Technical Field
The present invention relates to a barcode printing method for printing barcodes using a line print head having printing elements arrayed in a line, and to a printing device for the same.
2. Related Art
One-dimensional barcodes that are printed using a line thermal head and have bars of specified widths formed in a specific pattern perpendicular to the transportation direction of the recording medium (referred to herein as “picket fence barcodes”) display information using the pattern of the bar widths and the spaces between the bars in the barcode. As a result, if any of the printing elements of the line print head are damaged such that some print dots cannot be formed, bars may be lost or the bar width or space between the bars may vary, and the expected information may not be displayed. To address this problem, a method of printing a barcode when some printing elements of the line print head are faulty and cannot print normally by shifting the printing position of the barcode widthwise (in the line direction of the line print head) so that the barcode can be printed using a series of printing elements not including the faulty printing elements is known from the literature.
Japanese Unexamined Patent Appl. Pub. JP-A-H09-24627 teaches an inkjet image recording device that detects the locations of faulty dot printing elements by reading the printed barcode with a scanner, and prints barcodes using dot printing elements not including the faulty dot printing elements by shifting the paper widthwise based on the result of detecting the faulty dot printing elements.
Japanese Unexamined Patent Appl. Pub. JP-A-2003-145734 teaches an inkjet barcode recording device that detects the locations of faulty nozzles using a scanner, and prints the barcode using a nozzle group not including the faulty nozzles at a position shifted widthwise from the initial printing position on the recording medium.
Japanese Unexamined Patent Appl. Pub. JP-A-2006-44027 teaches a thermal printing device that detects a group of heat elements that does not include faulty dots in a short time even when there are faulty heat elements in plural locations, and prints barcodes at a position shifted widthwise to the recording medium using the detected group of heat elements.
Such methods of shifting the printing position must find a part of the line print head where there is a group of consecutive normally functioning printing elements that can print the desired barcode. If faulty printing elements are found at plural locations, finding such a continuous group of normal printing elements can be time-consuming.
For example, in the printing device described in JP-A-2006-44027, a range of high usage frequency printing elements is predefined in the printing element array in order to shorten the search time, and this range is searched to find a continuous series of normal printing elements that can print the barcode. Because this search operation restricts looking for printing elements that can print the barcode to a limited range, the likelihood of determining that printing the barcode is not possible and the barcode thus not being printed is high. This method is therefore not practical.
The method described in JP-A-2006-44027 finds the location of a group of continuous printing elements that can print normally by shifting the barcode print data one dot at a time right and left in the line direction, and uses the group of printing elements that was found with the least shift distance to print the barcode. This pattern-matching operation is time-consuming, however, and not efficient.
In addition, faulty heat elements in a thermal head include both heat elements that do not heat when energized, and heat elements that heat when not driven.
Methods of the related art that only treat elements that cannot form print dots as faulty printing elements can result in printing unnecessary print dots where there is supposed to be a space instead of a printed bar, and printing a defective barcode with wider than expected bars or no spaces where expected may be unavoidable.